(:: pragma bea:global-element-parameter parameter="$submitOrder1" element="ns1:SubmitOrder" location="../WSDLs/SubmitOrder.wsdl" ::)
(:: pragma bea:global-element-return element="ns0:createDeviceRequest" location="../xsd/CreateDeviceRequest.xsd" ::)

declare namespace ns1 = "http://www.example.org/SubmitOrder/";
declare namespace ns0 = "http://integration.clearwire.com/public/interfaces/AAA/CreateDeviceRequest.xsd";
declare namespace xf = "http://tempuri.org/ActivateNewCustomer/Transformation/test/";

declare function xf:test($submitOrder1 as element(ns1:SubmitOrder))
    as element(ns0:createDeviceRequest) {
        <ns0:createDeviceRequest>
            <ns0:macAddress>{ data($submitOrder1/macID) }</ns0:macAddress>
            <ns0:account>{ data($submitOrder1/customer_id) }</ns0:account>
            <ns0:domain>{ data($submitOrder1/realm) }</ns0:domain>
        </ns0:createDeviceRequest>
};

declare variable $submitOrder1 as element(ns1:SubmitOrder) external;

xf:test($submitOrder1)